<?php

namespace App\Http\Controllers\V1;

use App\Http\Controllers\ApiBaseController;
use App\Models\SysOperLog;
use Illuminate\Http\Request;

class SysOperLogController extends ApiBaseController
{
    public function index(Request $request){
        $paginator = SysOperLog::filter($request->all())->dataFilter()->orderBy('id', 'desc')->paginate($this->pageSize);
        return success(page_format($paginator));

    }

    public function clean(SysOperLog $model){
        $model->truncate();
    }
    public function destroy($ids, Request $request, SysOperLog $model){
        $id_arr = explode(',', $ids);
        $model->destroy($id_arr);
    }
}
